package cn.mcch.investigator.service;

import android.content.Context;
import android.os.Handler;
import android.os.Message;

import cn.mcch.investigator.utils.L;
import cn.mcch.investigator.utils.VibratorUtil;

public class SmsHandler extends Handler {
    private Context mContext;
    private long[] pattern;

    public SmsHandler(Context context) {
        this.mContext = context;
        pattern = new long[]{500, 2000, 500, 2000, 500, 2000, 500, 2000, 500, 2000};
    }

    @Override
    public void handleMessage(Message msg) {
        SmsInfo smsInfo = (SmsInfo) msg.obj;
        L.e(smsInfo.toString());
        // 震动，铃响提示
        VibratorUtil.Vibrate(mContext, pattern, false);
        // 自助下单到后台

    }
}